package com.muyu.danmo.service.impl;


import com.muyu.danmo.domain.DanmoTariningWorks;
import com.muyu.danmo.mapper.DanmoTariningWorksMapper;
import com.muyu.danmo.service.IDanmoTariningWorksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 培训班作品照片Service业务层处理
 *
 * @author yangle
 * @date 2024-10-21
 */
@Service
public class DanmoTariningWorksServiceImpl implements IDanmoTariningWorksService
{
    @Autowired
    private DanmoTariningWorksMapper danmoTariningWorksMapper;

    /**
     * 查询培训班作品照片
     *
     * @param id 培训班作品照片主键
     * @return 培训班作品照片
     */
    @Override
    public DanmoTariningWorks selectDanmoTariningWorksById(Long id)
    {
        return danmoTariningWorksMapper.selectDanmoTariningWorksById(id);
    }

    /**
     * 查询培训班作品照片列表
     *
     * @param danmoTariningWorks 培训班作品照片
     * @return 培训班作品照片
     */
    @Override
    public List<DanmoTariningWorks> selectDanmoTariningWorksList(DanmoTariningWorks danmoTariningWorks)
    {
        return danmoTariningWorksMapper.selectDanmoTariningWorksList(danmoTariningWorks);
    }

    /**
     * 新增培训班作品照片
     *
     * @param danmoTariningWorks 培训班作品照片
     * @return 结果
     */
    @Override
    public int insertDanmoTariningWorks(DanmoTariningWorks danmoTariningWorks)
    {
        return danmoTariningWorksMapper.insertDanmoTariningWorks(danmoTariningWorks);
    }

    /**
     * 修改培训班作品照片
     *
     * @param danmoTariningWorks 培训班作品照片
     * @return 结果
     */
    @Override
    public int updateDanmoTariningWorks(DanmoTariningWorks danmoTariningWorks)
    {
        return danmoTariningWorksMapper.updateDanmoTariningWorks(danmoTariningWorks);
    }

    /**
     * 批量删除培训班作品照片
     *
     * @param ids 需要删除的培训班作品照片主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTariningWorksByIds(Long[] ids)
    {
        return danmoTariningWorksMapper.deleteDanmoTariningWorksByIds(ids);
    }

    /**
     * 删除培训班作品照片信息
     *
     * @param id 培训班作品照片主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTariningWorksById(Long id)
    {
        return danmoTariningWorksMapper.deleteDanmoTariningWorksById(id);
    }
}
